<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>gvn.cmdline.OptionParser</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">

<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="gvn-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" align="right" width="100%">
      <table border="0" cellpadding="0" cellspacing="0">
      <tr><th class="navbar" align="center">
        <p class="nomargin">
          <a class="navbar" target="_top" href="http://code.google.com/p/gvn/">Project&nbsp;Homepage</a>
      </p></th></tr></table>
    </th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <font size="-1"><b class="breadcrumbs">
        <a href="gvn-module.html">Package&nbsp;gvn</a> ::
        <a href="gvn.cmdline-module.html">Module&nbsp;cmdline</a> ::
        Class&nbsp;OptionParser
      </b></font></br>
    </td>
    <td><table cellpadding="0" cellspacing="0">
      <tr><td align="right"><font size="-2">[<a href="../private/gvn.cmdline.OptionParser-class.html">show&nbsp;private</a>&nbsp;|&nbsp;hide&nbsp;private]</font></td></tr>
      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="gvn.cmdline.OptionParser-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
    </table></td>
</tr></table>

<!-- =========== START OF CLASS DESCRIPTION =========== -->
<h2 class="class">Class OptionParser</h2>

<pre class="base-tree">
<a href="optparse.OptionContainer-class.html"><code>OptionContainer</code></a> --+    
                  |    
       <a href="optparse.OptionParser-class.html"><code>OptionParser</code></a> --+
                      |
                     <b>OptionParser</b>
</pre><br />

<hr/>


<!-- =========== START OF METHOD SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
  <th colspan="2">Method Summary</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="__init__"></a><span class="summary-sig"><span class="summary-sig-name">__init__</span>(<span class=summary-sig-arg>self</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="AddOptions"></a><span class="summary-sig"><span class="summary-sig-name">AddOptions</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>options</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="gvn.cmdline.OptionParser-class.html#Callback" class="summary-sig-name"><code>Callback</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>option</span>,
          <span class=summary-sig-arg>opt_str</span>,
          <span class=summary-sig-arg>value</span>,
          <span class=summary-sig-arg>parser</span>)</span></code>
<br />
Callback action to process each option.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="gvn.cmdline.OptionParser-class.html#error" class="summary-sig-name"><code>error</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>msg</span>)</span></code>
<br />
Turn optparse's attempts at sabotage into exceptions.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="parse_args"></a><span class="summary-sig"><span class="summary-sig-name">parse_args</span>(<span class=summary-sig-arg>self</span>,
          <span class="summary-sig-vararg">*args</span>,
          <span class="summary-sig-kwarg">**kwargs</span>)</span></code>
</td></tr>
<tr bgcolor="#e8f0f8" class="group">
  <th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;Inherited from OptionParser</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionParser-class.html#add_option_group" class="summary-sig-name"><code>add_option_group</code></a>(<span class=summary-sig-arg>self</span>,
          <span class="summary-sig-vararg">*args</span>,
          <span class="summary-sig-kwarg">**kwargs</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionParser-class.html#check_values" class="summary-sig-name"><code>check_values</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>values</span>,
          <span class=summary-sig-arg>args</span>)</span></code>
<br />
check_values(values : Values, args : [string]) -&gt; (values : Values, 
args : [string])</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionParser-class.html#destroy" class="summary-sig-name"><code>destroy</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
Declare that you are done with this OptionParser.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionParser-class.html#disable_interspersed_args" class="summary-sig-name"><code>disable_interspersed_args</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionParser-class.html#enable_interspersed_args" class="summary-sig-name"><code>enable_interspersed_args</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionParser-class.html#exit" class="summary-sig-name"><code>exit</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>status</span>,
          <span class=summary-sig-arg>msg</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionParser-class.html#expand_prog_name" class="summary-sig-name"><code>expand_prog_name</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>s</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionParser-class.html#format_epilog" class="summary-sig-name"><code>format_epilog</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>formatter</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionParser-class.html#format_help" class="summary-sig-name"><code>format_help</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>formatter</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionParser-class.html#format_option_help" class="summary-sig-name"><code>format_option_help</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>formatter</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionParser-class.html#get_default_values" class="summary-sig-name"><code>get_default_values</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionParser-class.html#get_description" class="summary-sig-name"><code>get_description</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionParser-class.html#get_option_group" class="summary-sig-name"><code>get_option_group</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>opt_str</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionParser-class.html#get_prog_name" class="summary-sig-name"><code>get_prog_name</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionParser-class.html#get_usage" class="summary-sig-name"><code>get_usage</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionParser-class.html#get_version" class="summary-sig-name"><code>get_version</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionParser-class.html#print_help" class="summary-sig-name"><code>print_help</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>file</span>)</span></code>
<br />
print_help(file : file = stdout)</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionParser-class.html#print_usage" class="summary-sig-name"><code>print_usage</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>file</span>)</span></code>
<br />
print_usage(file : file = stdout)</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionParser-class.html#print_version" class="summary-sig-name"><code>print_version</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>file</span>)</span></code>
<br />
print_version(file : file = stdout)</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionParser-class.html#set_default" class="summary-sig-name"><code>set_default</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>dest</span>,
          <span class=summary-sig-arg>value</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionParser-class.html#set_defaults" class="summary-sig-name"><code>set_defaults</code></a>(<span class=summary-sig-arg>self</span>,
          <span class="summary-sig-kwarg">**kwargs</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionParser-class.html#set_process_default_values" class="summary-sig-name"><code>set_process_default_values</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>process</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionParser-class.html#set_usage" class="summary-sig-name"><code>set_usage</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>usage</span>)</span></code>
</td></tr>
<tr bgcolor="#e8f0f8" class="group">
  <th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;Inherited from OptionContainer</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionContainer-class.html#add_option" class="summary-sig-name"><code>add_option</code></a>(<span class=summary-sig-arg>self</span>,
          <span class="summary-sig-vararg">*args</span>,
          <span class="summary-sig-kwarg">**kwargs</span>)</span></code>
<br />
add_option(Option) add_option(opt_str, ..., kwarg=val, ...)</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionContainer-class.html#add_options" class="summary-sig-name"><code>add_options</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>option_list</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionContainer-class.html#format_description" class="summary-sig-name"><code>format_description</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>formatter</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionContainer-class.html#get_option" class="summary-sig-name"><code>get_option</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>opt_str</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionContainer-class.html#has_option" class="summary-sig-name"><code>has_option</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>opt_str</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionContainer-class.html#remove_option" class="summary-sig-name"><code>remove_option</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>opt_str</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionContainer-class.html#set_conflict_handler" class="summary-sig-name"><code>set_conflict_handler</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>handler</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="optparse.OptionContainer-class.html#set_description" class="summary-sig-name"><code>set_description</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>description</span>)</span></code>
</td></tr>
</table><br />


<!-- =========== START OF CLASS VARIABLE SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
  <th colspan="2">Class Variable Summary</th></tr>
<tr bgcolor="#e8f0f8" class="group">
  <th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;Inherited from OptionParser</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>list</code></font></td>
<td><b><a href="optparse.OptionParser-class.html#standard_option_list"><code>standard_option_list</code></a></b> = <span title="[]"><code>[]                                </code>
</span></td></tr>
</table><br />


<!-- =========== START OF METHOD DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
  <th colspan="2">Method Details</th></tr>
</table>

<a name="Callback"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">Callback</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>option</span>,
          <span class=sig-arg>opt_str</span>,
          <span class=sig-arg>value</span>,
          <span class=sig-arg>parser</span>)</span>
  </h3>
  <p>Callback action to process each option.</p>
  All i want is a list of options the user gave, but the only way to 
  get it is to reimplement the option handling entirely.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="error"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">error</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>msg</span>)</span>
  </h3>
  <p>Turn optparse's attempts at sabotage into exceptions.</p>
  optparse comes from the &quot;why raise an exception like a sane 
  library when you can just spew to stderr and then sys.exit?&quot; 
  school of thought. How nice.
  <dl><dt></dt><dd>
    <dl><dt><b>Overrides:</b></dt>
      <dd><a href="optparse.OptionParser-class.html#error"><code>optparse.OptionParser.error</code></a></dd>
    </dl>
  </dd></dl>
</td></tr></table>
<br />


<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="gvn-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" align="right" width="100%">
      <table border="0" cellpadding="0" cellspacing="0">
      <tr><th class="navbar" align="center">
        <p class="nomargin">
          <a class="navbar" target="_top" href="http://code.google.com/p/gvn/">Project&nbsp;Homepage</a>
      </p></th></tr></table>
    </th>
  </tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td align="left"><font size="-2">Generated by Epydoc 2.1 on Tue Jul 17 16:51:46 2007</font></td>
    <td align="right"><a href="http://epydoc.sourceforge.net"
                      ><font size="-2">http://epydoc.sf.net</font></a></td>
  </tr>
</table>
</body>
</html>
